import {
    SET_NOWDAY
} from '../mutation-types';

const state = {
    show: true
}

const mutations = {
    [SET_NOWDAY](state) {
        state.show = !state.show
    }
}

const actions = {
    CHANGE_NOWDAY: ({ commit, dispatch }) => {
        commit(SET_NOWDAY)
        /*
         Q: 为什么还需要 dispatch ?
         A: 还可以 dispatch 其他 action
         */
    }
}

export default {
    state,
    actions,
    mutations
}
